{% import 'IcsocIvrBundle:Ivr:node_fields.html.twig' as ivr %}
{% from 'IcsocUIBundle:Macro:actions.html.twig' import button %}
<form class="form-horizontal" action="" method="post" name="form">
    {{ ivr.node_name()  }}
	<div class="form-group">
        <label for="form_ivr_list" class="col-sm-3 control-label no-padding-right">IVR<font color="red">*</font> </label>
        <div class="col-sm-9">
            <select id="form_ivr_list" name="form[ivr_list]" class="col-sm-6">
				<option value="" selected="selected">{{ "Please Select Ivr"|trans }}</option>
                {% for ivr_info in ivr_list %}
                    <option value="{{ ivr_info.ivr_code }}">
						{{ ivr_info.ivr_name}}
                    </option>
                {% endfor %}
            </select>
        </div>
    </div>
	
	<div class="form-group">
        <label for="form_ivr_node" class="col-sm-3 control-label no-padding-right">Node<font color="red">*</font> </label>
        <div class="col-sm-9">
            <select id="form_ivr_node" name="form[ivr_node]" class="col-sm-6">
				<option value="" selected="selected">{{ "Please Select Ivr Node"|trans }}</option>
            </select>
        </div>
    </div>
	    {{ ivr.ivr_count() }}
    <div class="clearfix well well-sm">
        <div class="col-md-offset-4 col-md-8">
            {{ button('Save', 'btn-node-attr') }}
        </div>
    </div>
</form>

<script type="application/javascript">
    $(document).ready(function(){
        $('#form_ivr_list').on('change', function() {
            getIvrNode(this.value);
        });
    });
</script>	